package com.pine.sunshineelder.staff.service;

import java.util.Map;

import com.pine.sunshineelder.common.dto.QueryResult;
import com.pine.sunshineelder.common.entity.StaffEntity;
import com.pine.sunshineelder.staff.ao.StaffAddAo;

/**
 * 
 * @author 陈玉持
 *
 */
public interface StaffService {
	/**
	 * 新增
	 * @param ao
	 * @return
	 * @throws Exception
	 */
	StaffEntity addStaff(StaffAddAo ao)throws Exception;
	/**
	 * 删除(改变状态)
	 * @param id
	 * @throws Exception
	 */
	void deleteStaff(String id)throws Exception;
	/**
	 * 修改
	 * @param id
	 * @param map
	 * @return
	 * @throws Exception
	 */
	StaffEntity modeifyStaff(String id,Map<String,String>map)throws Exception;
	/** 
	 * 通过id查询
	 * @param id
	 * @return
	 * @throws Exception
	 */
	StaffEntity queryById(String id)throws Exception;
	
	/**
	 * 根据角色查
	 * @param role
	 * @return
	 * @throws Exception
	 */
	StaffEntity queryByRole(String role)throws Exception;
	/**
	 * 模糊分页
	 * @param key
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	QueryResult<StaffEntity> queryBykey(String key, Integer pageNo, Integer pageSize) throws Exception;
}
